<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>索引时优化 | Elasticsearch: 权威指南 | Elastic</title>
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
</head>
<body>
<div class="main-container">
    <section id="content">
        
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原文地址: <a href="https://www.elastic.co/guide/cn/elasticsearch/guide/current/_index_time_optimizations.html" rel="nofollow">https://www.elastic.co/guide/cn/elasticsearch/guide/current/_index_time_optimizations.html</a>, 版权归 www.elastic.co 所有<br/>
                            英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/_index_time_optimizations.html" rel="nofollow">https://www.elastic.co/guide/en/elasticsearch/guide/current/_index_time_optimizations.html</a>
                            </div>
                        <!-- start body -->
                  <div class="page_header">
<b>请注意:</b><br>本书基于 Elasticsearch 2.x 版本，有些内容可能已经过时。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch: 权威指南</a></span>
»
<span class="breadcrumb-link"><a href="search-in-depth.html">深入搜索</a></span>
»
<span class="breadcrumb-link"><a href="partial-matching.html">部分匹配</a></span>
»
<span class="breadcrumb-node">索引时优化</span>
</div>
<div class="navheader">
<span class="prev">
<a href="_query_time_search_as_you_type.html">« 查询时输入即搜索</a>
</span>
<span class="next">
<a href="_ngrams_for_partial_matching.html">Ngrams 在部分匹配的应用 »</a>
</span>
</div>
<div class="section">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="_index_time_optimizations"></a>索引时优化<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/edit/cn/130_Partial_Matching/25_Index_time.asciidoc">edit</a>
</h2>
</div></div></div>
<p>到目前为止，所有谈论过的解决方案都是在 <em>查询时（query time）</em> 实现的。这样做并不需要特殊的映射或特殊的索引模式，只是简单使用已经索引的数据。</p>
<p>查询时的灵活性通常会以牺牲搜索性能为代价，有时候将这些消耗从查询过程中转移到别的地方是有意义的。在实时 web 应用中， 100 毫秒可能是一个难以忍受的巨大延迟。</p>
<p>可以通过在索引时处理数据提高搜索的灵活性以及提升系统性能。为此仍然需要付出应有的代价：增加的索引空间与变慢的索引能力，但这与每次查询都需要付出代价不同，索引时的代价只用付出一次。</p>
<p>用户会感谢我们。</p>
</div>
<div class="navfooter">
<span class="prev">
<a href="_query_time_search_as_you_type.html">« 查询时输入即搜索</a>
</span>
<span class="next">
<a href="_ngrams_for_partial_matching.html">Ngrams 在部分匹配的应用 »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>